package com.neusoft.demo5;

public class Test {
    public static void main(String[] args) {
        Student s1 = new Student();//创建一个学生对象s1
        s1.sid = 100; //给对象的属性赋值
        s1.name = "fender";
        s1.age = 18;
        s1.study();//调用学生对象s1中的方法
        s1.eat();
        System.out.println(s1.sid + " " + s1.name + " " + s1.age);
        Student s2 = new Student();
        s2.sid = 101;
        s2.name = "gibson";
        s2.age = 19;
        s2.study();
        s2.eat();
        System.out.println(s2.sid + " " + s2.name + " " + s2.age);
    }
}
